package com.bwie.config;

import com.google.common.hash.BloomFilter;
import com.google.common.hash.Funnels;
import javafx.scene.effect.Bloom;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

import java.nio.charset.Charset;
@Component
public class BloomConfig  {
    @Bean
    public BloomFilter<String> filter(){
        Charset charset = Charset.forName("utf-8");
        BloomFilter bloomFilter = BloomFilter.create(Funnels.stringFunnel(charset), 1000000, 0.000001);
        return bloomFilter;
    }
}
